<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        "use strict";
        let p = {
            firstName:'a',
            lastName:'b'
        }
        Object.defineProperty(p,'fullName',{
            configurable:true,
            enumerable:true,
            get(){
                return this.firstName + '-' + this.lastName;
            },
            set(value){
                let arr = value.split('-');
                this.firstName = arr[0];
                this.lastName = arr[1];
            }
        })
        p.fullName = 'pp-o';
        // delete p.fullName;
        console.log(p);
        for(let key in p){
            console.log(key);
        }
    </script>
</body>
</html>